<!--制度审批-->
<div class="rightDiv" [hidden]="pageIndex != 1">
  <div class="exciseTableDiv">
    <div style="margin-top: 15px">
      <div class="searchDiv text-right" style="margin-bottom: 15px">
        <label>
          <span>文件号：</span>
          <input nz-input placeholder="请输入" [(ngModel)]="searchObj.number"/>
        </label>
        <label>
          <span>制度名称：</span>
          <input nz-input placeholder="请输入" [(ngModel)]="searchObj.name"/>
        </label>
        <label>
          <span>作用对象：</span>
          <nz-select nzPlaceHolder="请选择" [(ngModel)]="searchObj.actionTarget" style="width: 180px">
            <nz-option *ngFor="let option of zydxList;" [nzValue]="option.text" [nzLabel]="option.text"></nz-option>
          </nz-select>
        </label>
        <label>
          <span>发布人：</span>
          <input nz-input placeholder="请输入" [(ngModel)]="searchObj.publisherName"/>
        </label>
        <label>
          <span>发布部门：</span>
          <input nz-input placeholder="请输入" [(ngModel)]="searchObj.deptName"/>
        </label>
        <label style="margin-right: 0">
          <button nz-button style="margin-right:10px" nzType="primary" (click)="clickSearch()">查询</button>
          <button nz-button nzType="default" (click)="resetSearch()">重置</button>
        </label>
      </div>
      <div>
        <ng-template #totalTemplate let-total>总共 {{ pageInfo.totalRecords? pageInfo.totalRecords:0 }} 条</ng-template>
        <nz-table
          #exciseBankTable
          nzBordered
          [nzData]="allList"
          [nzFrontPagination]="false"
          [nzShowPagination]="true"
          [nzPageIndex]="pageInfo.first"
          [nzTotal]="pageInfo.totalRecords"
          [nzShowTotal]="totalTemplate"
          [nzPageSize]="pageInfo.rows"
          [nzLoadingDelay]="1"
          [nzPageSizeOptions]="[10,20,30,50,100]"
          [nzShowQuickJumper]="true"
          [nzShowSizeChanger]="true"
          (nzPageIndexChange)="searchPageIndex($event)"
          (nzPageSizeChange)="searchPageSize($event)"
          [nzWidthConfig]="widthConfigs"
          [nzScroll]="{x: '2000px'}"
        >
          <thead>
          <tr>
            <th nzLeft="0px">序号</th>
            <th>文件号</th>
            <th>制度名称</th>
            <th>制度类型</th>
            <th>执行部门</th>
            <th>作用对象</th>
            <th>制度状态</th>
            <th>制度生效日期</th>
            <th>发布人</th>
            <th>发布部门</th>
            <th>发布日期</th>
            <th>反馈人</th>
            <th nzRight="0px">操作</th>
          </tr>
          </thead>
          <tbody>
          <tr *ngFor="let item of exciseBankTable.data;let i = index;">
            <td nzLeft="0px">{{ i + 1 }}</td>
            <td>{{item.number}}</td>
            <td>{{item.name}}</td>
            <td>{{item.caseType}}</td>
            <td>{{item.deptNameStr}}</td>
            <td>{{item.actionTarget}}</td>
            <td>{{stateObj[item.state]}}</td>
            <td>{{item.effectiveDate | date: 'yyyy-MM-dd'}}</td>
            <td>{{item.publisherName}}</td>
            <td>{{item.publishDeptName}}</td>
            <td>{{item.publishDate}}</td>
            <td>{{item.feedbackUserStr}}</td>
            <td nzRight="0px">
              <span class="operaFont m-r-sm" *ngIf="item.isLeader === 0 && (item.otherDeptAuth || '').split(',').includes('查看') || item.isLeader === 1" (click)="look(item)">查看</span>
              <span class="operaFont" *ngIf="item.isLeader === 0 && (item.otherDeptAuth || '').split(',').includes('下载') || item.isLeader === 1" (click)="downFj(item)">下载</span>
              <span class="operaTao m-l-sm" *ngIf="item.isLeader === 0 && (item.otherDeptAuth || ',').split(',').includes('执行分配') || item.isLeader === 1" (click)="zxfp(item)">执行分配</span>
            </td>
          </tr>
          </tbody>
        </nz-table>
      </div>
    </div>
  </div>
</div>

<app-system-form *ngIf="pageIndex == 2" [currObj]="currObj" [opreatType]="1" (backemit)="backthis($event)"></app-system-form>

<!--执行分配-->
<nz-modal [(nzVisible)]="isVisible"
          nzWidth="40%"
          [nzTitle]="modalTitle"
          [nzContent]="modalContent"
          (nzOnCancel)="isVisible = false"
          [nzFooter]="footModel"
          nzMaskClosable="false"
>
  <ng-template #modalTitle>
    <span>执行分配</span>
  </ng-template>
  <ng-template #modalContent>
    <div style="height: 200px;width: 90%;margin: 20px auto 0;">
      <span style="display:inline-block; width: 15%"><span style="color: red">*</span>执行分配：</span>
      <nz-select [(ngModel)]="selTeacher" nzMode="multiple" nzShowSearch nzPlaceHolder="请选择" style="width: 85%">
        <nz-option *ngFor="let item of teacherList" [nzValue]="item.id" [nzLabel]="item.name + ' ' + item.number"></nz-option>
      </nz-select>
    </div>
  </ng-template>
  <ng-template #footModel>
    <button nz-button nzType="default" (click)="isVisible = false">取消</button>
    <button nz-button nzType="primary" (click)="submitFp()" [disabled]="selTeacher.length <= 0">保存</button>
  </ng-template>
</nz-modal>
